package com.sisSaude.daos;

import java.sql.ResultSet;

import com.sisSaude.entityBeans.GenericEntityBean;

public abstract class GenericDAO<T extends GenericEntityBean> {
	public static String SELECT_BASICA = "";
	
	protected abstract boolean insert(T entity);
	protected abstract boolean update(T entity);
	public boolean save(T entity) {
		if (entity.getId() == 0)
			return insert(entity);
		return update(entity);
	}
	public abstract boolean delete(T entity);
	public abstract T get(int id);
	public abstract void loadAttribs(T entity, ResultSet r);

}
